package com.plian.system.service.ms;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.entity.ms.RectificationSituation;
import com.plian.system.excel.ImportResult;
import com.plian.system.mybatis.base.BaseService;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.concurrent.Future;

/**
 * 整改情况表服务类
 */
public interface IRectificationSituationService extends BaseService<RectificationSituation> {

	/**
	 * 校验编码
	 *
	 * @param id
	 * @param code
	 * @return
	 */
	Boolean checkIsExisted(Long id, String code);
	/**
	 * 保存或新增,包含子表
	 *
	 * @param rectificationSituation
	 * @return
	 */
	Boolean submit(RectificationSituation rectificationSituation);

	/**
	 * 校验是否能取消审核和变更
	 *
	 * @param id
	 * @return
	 */
	Boolean checkCancel(Long id);

	List<PageData> orgBydate(PageData pageData);

	List<PageData> orgBymonth(PageData pageData);

	/**
	 * @Description: //TODO 下发消息
	 * @Author: Take-off
	 * @Date: 9:45 AM 2023/5/24
	 * @Param: [situation]
	 * @return: void
	 **/
	void sendMessage(RectificationSituation situation);

	Future<ImportResult> importExcel(String progressId, InputStream inputStream);
	/**
	 *  生成excel文件 并返回文件名  时间戳+"-"+uuid
	 * @param
	 * @return
	 */
	String export();
	/**
	 * excel文件下载
	 *
	 * @param key
	 * @param response
	 */
	void download(String key, HttpServletResponse response);
}
